// +----------------------------------------------------------------------
// | 网评管理系统V4.0
// +----------------------------------------------------------------------
// | 版权所有 2006~2021 广西龙讯互动信息技术股份有限公司
// +----------------------------------------------------------------------
// | 官方网站: http://www.longsunhd.com/
// +----------------------------------------------------------------------
// | 作者: 鲲鹏 <414797210@qq.com>
// +----------------------------------------------------------------------

package com.javaweb.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.javaweb.common.common.BaseServiceImpl;
import com.javaweb.system.entity.GroupMenu;
import com.javaweb.system.mapper.GroupMenuMapper;
import com.javaweb.system.service.IGroupMenuService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 角色菜单关联表 服务实现类
 * </p>
 *
 * @author 鲲鹏
 * @since 2020-10-30
 */
@Service
public class GroupMenuServiceImpl extends BaseServiceImpl<GroupMenuMapper, GroupMenu> implements IGroupMenuService {

    /**
     * 根据角色ID删除角色菜单关系数据
     *
     * @param groupId 角色ID
     * @return
     */
    @Override
    public boolean deleteGroupMenus(Integer groupId) {
        QueryWrapper<GroupMenu> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("group_id", groupId);
        boolean result = remove(queryWrapper);
        return result;
    }
}
